#include<stdio.h>
int main()
{
	int a,z,x,c,v,b,n;
	scanf("%d",&a);
	z=a/100;
	x=(a-100*z)/50;
	c=(a-100*z-50*x)/20;
	v=(a-100*z-50*x-20*c)/10;
	b=(a-100*z-50*x-20*c-10*v)/5;
	n=a-100*z-50*x-20*c-10*v-5*b;
	printf("%d %d %d %d %d %d",z,x,c,v,b,n);
	return 0;
}
